export default class Component {
    public state: object;
    constructor() {
        this.pageWillMount();
        this.state = {}
        window.addEventListener('DOMContentLoaded', this.pageDidMount.bind(this), false);
        window.addEventListener('unload', () => {
            window.removeEventListener('DOMContentLoaded', this.pageDidMount.bind(this), false)
            this.pageWillUnMount()
        })
    }
    pageWillMount() {

    }
    pageDidMount() {

    }
    pageWillUnMount() {

    }
    setState(__params: object){
        this.state = {
            ...this.state,
            ...__params
        }
    }
}